<?php

namespace App\Services;

use App\Exceptions\Error;

/**
 * @package App\Services
 * @see FeedbackService
 */
class FeedbackService extends BaseService
{
    private $_repository;

    public function __construct()
    {
        parent::__construct();
        $this->_repository = repository()->SysFeedbackRepository;
    }

    /**
     * 新增意见反馈
     * @param $params
     * @return bool|\Illuminate\Http\JsonResponse|bool
     */
    public function createFeedback($params)
    {
        $feedback = $this->_repository->createFeedback($params);
        if (!$feedback) {
            return Error::handle();
        }

        return true;
    }
}
